package com.xinzhi.controller;


import com.xinzhi.entity.Result;
import com.xinzhi.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    private ProductService productService;

    @RequestMapping("/getProductByColId")
    public Result getProductByColId(String colId){
        return productService.getProductByColId(colId);
    }
    @RequestMapping("/getProdictById")
    public Result getProductById(String id){
        return productService.getProductBylId(id);
    }
}
